package cn.lyd;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.context.annotation.ComponentScan;

/**
 * 启动类
 */
@SpringBootApplication  //声明当前类是springboot的项目的启动类
//@EnableAutoConfiguration  自动配置，静态资源放行，开启springmvc注解支持=能使用@requestMapping
//@ComponentScan    //扫描包-扫描当前包及其子包：能够使用@controller、@service、@component、@repository

@MapperScan("cn.lyd.*.mapper")//扫描mapper接口包，生成mapper接口的代理对象
@ServletComponentScan(value = {"cn.lyd.basic.listener"})
public class PethomeApplication {
    public static void main(String[] args) {
        //使用启动类 去运行spring程序
        SpringApplication.run(PethomeApplication.class,args);

    }

}
